import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    port: 5173,
    host: '0.0.0.0',
    proxy: {
      '/v1': {
        target: 'https://dify.3songshu.com/',
        // target: 'http://192.168.9.192:7001/',
        changeOrigin: true,
        secure: false,
        rewrite: (path) => path.replace(new RegExp('^v1'), ''),
      },
    },
  },
})
